package com.tyut.service.Impl;

import com.tyut.mapper.HumanMapper;
import com.tyut.pojo.Human;
import com.tyut.service.HumanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HumanServiceImpl implements HumanService {

    @Autowired
    private HumanMapper humanMapper;

    @Override
    public Integer insertHuman(Human human) {
        int insert = humanMapper.insert(human);
        return insert;
    }

    @Override
    public List<Human> findHumanIn(String status) {
        //List<Human> humanIn = humanMapper.selectByExample(status);
        List<Human> humanIn = humanMapper.findHumanIn(status);
        return humanIn;
    }

    @Override
    public List<Human> findHumanOut(String status) {
        List<Human> humanOut = humanMapper.findHumanOut(status);
        return humanOut;
    }
}
